package com.jjkj.environmental.environmental.api

import com.jjkj.environmental.environmental.bean.request.DvrService
import com.jjkj.environmental.environmental.bean.request.QueryRequest
import com.jjkj.environmental.environmental.bean.request.WriteRequest
import com.jjkj.environmental.environmental.bean.response.SoapResponse
import io.reactivex.Observable
import retrofit2.http.Body
import retrofit2.http.Headers
import retrofit2.http.POST

interface CarCheckApi {
    /**
     * 获取数据
     * SOAPAction: urn:queryObjectOutServer 请求的Action，类似于方法名
     *
     * @param queryRequest 查询用请求实体
     * @return 返回实体
     */
    @Headers("Content-Type: text/xml; charset=utf-8", "SOAPAction: urn:queryDataService")
    @POST("queryservice?wsdl")
    fun queryCheckInfoWithPull(@Body queryRequest: QueryRequest): Observable<SoapResponse>

    /**
     * 获取数据
     * SOAPAction: urn:writeDataService 请求的Action，类似于方法名
     *
     * @param writeRequest 写入用请求实体
     * @return 返回实体
     */
    @Headers("Content-Type: text/xml; charset=utf-8", "SOAPAction: urn:writeDataService")
    @POST("writeservice?wsdl")
    fun queryCheckInfoWithPull(@Body writeRequest: WriteRequest): Observable<SoapResponse>

    /**
     * 获取数据
     * SOAPAction: urn:dvrService 请求的Action，类似于方法名
     *
     * @param dvrService 录像用请求实体
     * @return 返回实体
     */
    @Headers("Content-Type: text/xml; charset=utf-8", "SOAPAction: urn:dvrService")
    @POST("dvrservice?wsdl")
    fun queryCheckInfoWithPull(@Body dvrService: DvrService): Observable<SoapResponse>
}